<!DOCTYPE html>
<html lang="zh-CN">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<title>Document</title>
</head>

<body>
	<script>
		// let str = 'abcdabd'
		// let arr = str.split("")
		// let ss = new Set(arr)
		// let new_arr = [...ss]
		// console.log(new_arr);


		// 基本的数据类型
		// let str = 'abcdabd'
		// let new_arr = [...new Set(str.split(""))]
		// console.log(new_arr);

		let str = 'abcdabd'
		let arr = str.split("")
		let xin = []
		for (let i = 0; i < arr.length; i++) {
			const ele = arr[i];
			// 不存在
			if (!xin.includes(ele)) {
				xin.push(ele)
			}
		}

		console.log(xin);


	</script>
</body>

</html>